package com.sphd.emanu.fragment.day;

import android.content.Context;

import com.sphd.emanu.mvp.BasePresenterImpl;
import com.sphd.emanu.pojo.MonthOrYearInfo;

import java.util.Map;

import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;

/**
 * MVPPlugin
 *  邮箱 784787081@qq.com
 */

public class DayPresenter extends BasePresenterImpl<DayContract.View> implements DayContract.Presenter{

    @Override
    public void getAllAccountData(Map<String, String> map) {
        emanuService.getAllAccountData(map).enqueue(new Callback<MonthOrYearInfo>() {
            @Override
            public void onResponse(Call<MonthOrYearInfo> call, Response<MonthOrYearInfo> response) {
                mView.setBean(response.body());
            }

            @Override
            public void onFailure(Call<MonthOrYearInfo> call, Throwable t) {
                Error(t);
            }
        });
    }
}
